/*
 * @Date: 2022-03-03 22:42:52
 * @LastEditors: zhaoxm
 * @LastEditTime: 2022-05-05 22:26:31
 * @Description: 全局指令注册
 */

const modules = import.meta.globEager("./*.js")

export default {
  install(Vue) {
    for (const path of Object.keys(modules)) {
      const directiveName = path.split("/")[1].replace(".js", "")
      Vue.directive(directiveName, modules[path].default)
    }
  },
}
